package com.itlong.cloud.sdkv3.resource;

import com.itlong.cloud.POJO.DTO.sdk.v3.ElevatorCheckDTO;
import com.itlong.cloud.POJO.DTO.sdk.v3.OpenDoorCheckDTO;
import com.itlong.cloud.POJO.VO.SDKMessageV3;
import com.itlong.cloud.equip.sdkv3.ISDKV3EquipClient;
import com.itlong.cloud.sdkv3.service.ISDKV3Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * <desc>
 * SDKV3接口实现类
 * </desc>
 *
 * @createDate 2021-05-17
 */
@RestController
public class SDKV3Resource implements ISDKV3EquipClient {

    @Autowired
    ISDKV3Service iSDKV3Service;

    /**
     * <desc>
     * 乘梯检查
     * </desc>
     *
     * @param dto 检查需要的参数
     * @return
     * @author zhouchun
     * @createDate 2021-05-17
     */
    @Override
    @RequestMapping(path = "/sdkv3/cloudElevatorCheck", method = RequestMethod.POST)
    public SDKMessageV3 cloudElevatorCheck(@RequestBody ElevatorCheckDTO dto) {
        return iSDKV3Service.cloudElevatorCheck(dto);
    }

    /**
     * <desc>
     * 开门检查
     * </desc>
     *
     * @param dto 检查需要的参数
     * @return
     * @author zhouchun
     * @createDate 2021-05-18
     */
    @Override
    @RequestMapping(path = "/sdkv3/openDoorCheck", method = RequestMethod.POST)
    public SDKMessageV3 openDoorCheck(@RequestBody OpenDoorCheckDTO dto) {
        return iSDKV3Service.openDoorCheck(dto);
    }

}